package org.rcy.framework.data.config.mybatis;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @author 吴康桥
 * @Description
 * @date 2022/9/29 15:58
 */

//配置控制是否使用mybatis
public class MybatisEnableSwitch implements Condition {
	@Override
	public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
		return conditionContext.getEnvironment().getProperty("rcy.mybatis.enable").contains("true");
	}
}
